package com.woniuxy.shiro;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * @BelongsProject: java-85-course-code
 * @BelongsPackage: com.woniuxy.shiro
 * @Author: LiTongMiao
 * @Date: 2022/2/23 12:17
 * @Description: 替代UsernamePasswordToken的一个 实体类！用于封装token！
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyJsonWebToken implements AuthenticationToken {
    private String token;

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
